package adapter;

public class AdvancedWeeder {
    private String machineId;

    public AdvancedWeeder(String machineId) {
        this.machineId = machineId;
    }

    public void performSmartWeeding() {
        System.out.println(machineId + "执行智能除草: 识别并清除杂草，保留作物");
    }

    public void adjustToEnvironment(double soilMoisture, int cropGrowthStatus, String weatherData) {
        System.out.println(machineId + "根据环境数据调整: 土壤湿度=" + soilMoisture + 
                          ", 作物生长状态=" + cropGrowthStatus + ", 天气=" + weatherData);
        if (soilMoisture > 70) {
            System.out.println(machineId + "调整除草策略: 减少深度，避免扰动湿土");
        }
    }

    public String getMachineId() {
        return machineId;
    }
}    